home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_100 / 199_01 / convert.me < prev    next >
Text File  |  1987-12-15  |  1KB  |  53 lines

  1. December 12, 1987
  2.  
  3. This code will currently compile without error ( /W3 ) using MicroSoft
  4. Qic C 1.0.
  5.  
  6. However, there are some problems with it.
  7.  
  8. ged9.c
  9.  
  10. /* initialise virtual memory system
  11.  */
  12. void initvm()
  13. {
  14. int  slot;
  15.  
  16. unsigned  int mem, stk;
  17. unsigned  char  *base, *pagemem, *stkaddr;
  18.  
  19. #ifdef  MSC
  20.   mem = _memavl();
  21.   stk = stackavail();
  22.   slotsinmem = ( mem - stk )/PAGESIZE;
  23.   pagemem = (char *)( 65535 - mem );
  24. #else
  25.   freeall( 5000 );
  26.   stkaddr = _showsp();
  27.   pagemem = _memory();
  28.   slotsinmem = ( stkaddr-STKSPACE-pagemem )/PAGESIZE;
  29. #endif
  30.  
  31. This is the first place to start.  Obviously this won't work - but
  32. it does allow you to at least get something on the screen.
  33.  
  34. The problem is to somehow come up with a suitable replacement that will work
  35. for both MSC and DeSmet.  (DeSmet is faster and I think easier to use than MSC,
  36. so it might be worth the effort to try and make Ged as portable as possible.)
  37.  
  38. This code initializes Ged's file and memory management system.
  39.  
  40. If you make any progress on getting ged to work using MSC would appreciate
  41. hearing about it.
  42.  
  43. See ged.doc for more information.
  44.  
  45. Have included the latest version of ged.exe compiled using DeSmet 3.03.
  46.  
  47.  
  48. Mel Tearle
  49. 1108 E.Georgia
  50. Phoenix, Az  85014
  51.  
  52.  
  53.